package com.demo.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Queue;
import javax.jms.Topic;

/**
 * @author wangzhanjin
 * @date 2018/6/13 19:57
 */
@Configuration
public class JmsConfig {
    @Bean
    public Queue queue() {
        //定义一个队列
        return new ActiveMQQueue("ptp.queue");
    }
    @Bean
    public Topic topic() {
        //定义一个队列
        return new ActiveMQTopic("my-topic");
    }
}